-
Notifications
You must be signed in to change notification settings - Fork 101
Check for deprecated/unknown environment variables #1342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1342 +/- ##
==========================================
+ Coverage 84.88% 84.89% +0.01%
==========================================
Files 100 100
Lines 14520 14547 +27
==========================================
+ Hits 12325 12350 +25
- Misses 1734 1735 +1
- Partials 461 462 +1
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
| } | ||
| } | ||
|
|
||
| func runDeprecatedEnvVarsTest(t *testing.T, tc deprecatedEnvVarsTest) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this instead just be done inside the unit tests instead of splitting it up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That increases the Cyclomatic complexity of the Test function.
| assert.Equal(t, expected, result) | ||
| } | ||
|
|
||
| type deprecatedEnvVarsTest struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be moved into the test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to define it outside as the linter gives error if we have more than 5 parameter in a function call.
| env: | ||
| NFPM_VERSION: 'v2.35.3' | ||
| GOPROXY: "direct" | ||
| GOPROXY: "https://${{ secrets.ARTIFACTORY_USER }}:${{ secrets.ARTIFACTORY_TOKEN }}@azr.artifactory.f5net.com/artifactory/api/go/f5-nginx-go-dev" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can revert this change, main branch will use the dev goproxy by default
Implemented a function to validate the environment variables passed are part of the new v3 allowed variables if not it should throw a warning message.
Checklist
Before creating a PR, run through this checklist and mark each as complete.
CONTRIBUTINGdocumentmake install-toolsand have attached any dependency changes to this pull requestREADME.md)